package com.idea.zd.sys.train.io;

import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintStream;

public class FileWriterTest {

    /**
     * FileWriter 字符输出流
     * @param args
     * @throws IOException
     */
    public static void main(String[] args) throws IOException{
        //创建输出流
        FileWriter fileWriter = new FileWriter("./src/main/java/com/idea/zd/sys/train/io/FileWriterTest.txt");
        //写入字符
        fileWriter.write("testtesttesttest\r\n");
        fileWriter.write("testtesttesttest\r\n");
        fileWriter.write("testtesttesttest\r\n");
        //关闭
        fileWriter.close();
    }
}
